/*
package com.csyf.manager.controller;

import com.csyf.manager.channel.weizhong.SybPayHander;
import com.csyf.manager.channel.xftx.XftxPayQueryBiz;
import com.csyf.manager.entity.SysTrade;
import com.csyf.manager.service.OrderBiz;
import com.csyf.manager.service.OrderService;
import com.csyf.manager.service.TestService;
import com.google.gson.Gson;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.util.Map;

@Slf4j
@Controller
public class TestController {

    @Autowired
    private HttpSession httpSession;

    @Autowired
    TestService testService;

    @Autowired
    private OrderService orderService;


    @Autowired
    private OrderBiz orderBiz;

    @Autowired
    private XftxPayQueryBiz xftxPayQueryBiz;

    @Autowired
    private SybPayHander sybPayHander;

    @RequestMapping("sytnotify")
    public @ResponseBody
    String sytnotify() {
        try {
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return "channel_success";
    }




    @ResponseBody
    @GetMapping("/order/{orderno}")
    public String queryorder(@PathVariable("orderno") String orderno) throws Exception {
        SysTrade sysTrade = orderService.queryOrderByOrderNo(orderno);

        switch (sysTrade.getServiceType()) {
            case "XFZF_JD":
            case "XFZF_JD_H5":
               return xftxprocess(sysTrade);
            case "SYB_WEIXIN_SM":
            case "SYB_ALI_SM":
                return sybprocess(sysTrade);
        }
        return null;
    }




    String xftxprocess(SysTrade sysTrade) throws Exception {
        Map<String, String> stringStringMap = xftxPayQueryBiz.doQuery(sysTrade.getOutTradeNo(), sysTrade.getMchId(), sysTrade.getSrcMchId());
        log.info(stringStringMap.toString());
        return new Gson().toJson(stringStringMap);
    }

    String sybprocess(SysTrade sysTrade) throws Exception {
        Map<String, String> map = sybPayHander.queryOrder(sysTrade.getOutTradeNo(), sysTrade.getMchId(), sysTrade.getSrcMchId());
        log.info(map.toString());
        return new Gson().toJson(map);
    }
}
*/
